
public class TranditionalThread {

	public static void main(String[] args) {
		
		//两种方法同时用于创建一个thread的时候，执行subclass覆盖的run方法
		new MyThread(new Runnable(){//方式一

			@Override
			public void run() {
				System.out.println("thread is running ...");
			}
			
		}).start();
		
	}
	
	private static class MyThread extends Thread {//方式二
		
		public MyThread(Runnable target) {
			super(target);
		}

		@Override
		public void run() {
			System.out.println("mythread is running ...");
		}
		
	}

}
